package com.huxiao.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

//等价于 <bean id="user" class = "com.huxiao.pojo.User"/>
//@Component 组件
@Component
public class User {
       /*相当于<property name="name" value="hou"></property>*/
    public String name ;

    @Value("huxiao")
    public void setName(String name) {
        this.name = name;
    }
}
